<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JSON</title>
	</head>
	<body>
		<h1>JSON对象创建</h1>
		<script>
			person = {
				name:'JACK',
				age:20,
				addr:{
					homeAddr:'晋中',
					workAddr:'太原'
				}
			};
			alert(person.addr.homeAddr);
			alert(person["age"]);       // 显示属性的值可以通过      对象.属性     对象['']
			students = [
			    {name:'kjt',
			    age:22
			    },
			    {name:'tt',
			    age:22
			    }
			]
			alert(students[1].age);
			s = {
    "sites": [
    { "name":"菜鸟教程" , "url":"www.runoob.com" }, 
    { "name":"google" , "url":"www.google.com" }, 
    { "name":"微博" , "url":"www.weibo.com" }
    ]
}
		</script>
	</body>
</html>
